import 'package:json_annotation/json_annotation.dart';
part 'fans_list_api.g.dart';

@JsonSerializable()
class ResponseFansListApi {
  final int total;
  final List<Fanser>? rows;

  ResponseFansListApi(this.total, this.rows);

  factory ResponseFansListApi.fromJson(Map<String, dynamic> json) =>
      _$ResponseFansListApiFromJson(json);

  Map<String, dynamic> toJson() => _$ResponseFansListApiToJson(this);

  static initial() {
    return ResponseFansListApi(0, []);
  }
}

@JsonSerializable()
class Fanser {
  final String fansUuid;
  final String? fansUserNickname;
  final String? fansUserAvatars;
  final bool? isFollow;
  final String? followTime;

  factory Fanser.fromJson(Map<String, dynamic> json) {
    return _$FanserFromJson(json);
  }

  Fanser({
    required this.fansUuid,
    required this.fansUserNickname,
    required this.fansUserAvatars,
    required this.isFollow,
    required this.followTime,
  });

  Map<String, dynamic> toJson() => _$FanserToJson(this);
}

